package phapp.dao.barapp;

import java.util.List;

import javacommon.base.*;
import cn.org.rapid_framework.page.*;
import org.springframework.stereotype.Component;

import phapp.model.barapp.*;

/**
  * <p> 标题: 会员酒吧积分表 ,tc_vip_bar_credit_info 数据处理层
  * <p>Description : 执行./mapper/的VipBarCreditMapper.xml的相应SQL语句
  * <p>Copyright: Copyright (c) 2014-10
  * <p>Company:
  * @see phapp.model.barapp.VipBarCredit
  * @author you name
  * @version 1.0
*/

@Component
public class VipBarCreditDao extends BaseIbatis3Dao<VipBarCredit,java.lang.Integer>{

   public Class getEntityClass() {
      return VipBarCredit.class;
   }
   /**
   * <p> 标题:修改和新增<br>
   * <p>Description :
   * @param VipBarCredit u  
   */
   public void saveOrUpdate(VipBarCredit entity) {
      if(entity.getId() == null)
         save(entity);
      else
         update(entity);
   }

   /**
   * <p> 标题:批量删除<br>
   * <p>Description :
   * @param VipBarCredit u
   * @return int 
   */
   public int removeByIdArry(VipBarCredit u) {
      int i=-1;
      i =delete("VipBarCredit.removeByIdArry", u);
      return i;
   }
   /**
   * <p> 标题:分页查询<br>
   * <p>Description :
   * @param PageRequest pageRequest
   * @return Page 
   */
   public Page findByPageRequest(PageRequest pageRequest) {
      return pageQuery("VipBarCredit.pageSelect",pageRequest);
   }


   /**
   * <p> 标题:按Bean查询返回List<br> 
   * @param VipBarCredit bean
   * @return List 
   */
   public java.util.List findListByBean(VipBarCredit bean){
	   return  getSqlSessionTemplate().selectList("VipBarCredit.findListByBean",bean);
   }
	/**
	* <p>按Bean查询返回List<br> 
	* @param VipBarCredit bean
	* @return List 
	*/
	public void updateBySelective(VipBarCredit u) { 
		getSqlSessionTemplate().update("VipBarCredit.updateBySelective",u);
	}
	   /**
		* <p>通过 Map 修改一条 数据<br> 
		* @param  java.util.Map 
	   */
	   public int updateByMap(java.util.Map map){
	  		int count = getSqlSessionTemplate().update("VipBarCredit.update",map);
	  		return count;
	  }

}
